import { reqGetHomeData } from '@/api/mock/home'
const state = {
  homeData: {}
}

const actions = {
  async getHomeData({ commit }) {
    let res = await reqGetHomeData()
    // console.log(res)
    commit('GET_HOME_DATA', res)
  }
}
const mutations = {
  GET_HOME_DATA(state, data) {
    state.homeData = data
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
